package com.fs.service.bo.cleaner;

import com.fs.entity.Cleaner;
import com.fs.entity.Shop;
import com.sun.istack.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;

import javax.validation.constraints.NotBlank;

@Data
@Slf4j
@Accessors(chain = true)
public class BoCleaner {

    private Integer Id;
    private String name;
    private String phone;
    private Integer shopId;

    public BoCleaner(Cleaner cleaner) {
        this.Id = cleaner.getId();
        this.name = cleaner.getName();
        this.phone = cleaner.getPhone();
        try {
            this.shopId = cleaner.getShop().getId();
        } catch (Exception e) {
            log.error("Clean => BoCleaner时出现异常，异常信息为：" + e.getMessage());
        }
    }
}
